Repository navigation
One stop judge for every ask, stop, block and extra fix round; the reviewer requests changes only for named problems; a replay suite of incidents - #495
Merged
Conversation
…viewer requests changes only for named problems; a replay suite of incidents Every costly decision (asking a person, stopping or waiting, requesting changes, a fix cycle beyond the first, handing a run off) goes through one judge that sees the whole run, on the strongest configured model at high effort. It proceeds on a written assumption, asks only for a fact only a person has (with options, a default and a deadline), or holds on a named, checked blocker. A source test fails on any path around it. The reviewer requests changes only for a named correctness, security or data-loss problem with its location and evidence; everything else is a Nit, Suggestion or FYI. A replay suite of incidents gates the decision paths and model or effort changes, and what people did after each decision is recorded for analytics, the weekly email and new replay cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CoderHelm felt dumb because narrow steps each picked the costly outcome when unsure: ask a person, stop, block, loop again. Every one of those decisions now goes through one stop judge that sees the whole run, on the strongest configured model at high effort. It proceeds on a written assumption (an Open item on the pull request), asks only for a fact only a person has (with what was tried, 2 to 4 options, a recommended default and a deadline), or holds only on a named blocker that cites checked evidence. A malformed answer is asked again once with the schema, then falls back to proceeding on reversible work, never to asking. A source test fails when any path asks a person, sets
needs_input, requests changes or starts another fix cycle without the judge.The reviewer follows the owner's policy: changes are requested only for a named correctness, security or data-loss problem with its location and evidence; every other finding is a Nit, Suggestion or FYI on the approval. A replay suite of real incidents gates every decision path and every model or effort change, and what people did after each decision is recorded, shown in Analytics and the weekly email, and exportable as new replay cases.
Changes
The stop judge (
common/src/stop_judge.rs,worker/src/passes/stop_judge.rs)Picture(ticket and acceptance criteria, related tickets and their PRs, plan, diff summary, CI and plan results, check and rule findings as evidence with ids, threads, budget, the proposed decision and its reason),Verdict(Proceed, Ask, Hold),validate(the rules above),fallback, andjudgeover aJudgeModeltrait.Judgedhas a private field: onlyjudgemakes one.review_verdict::postforREQUEST_CHANGES, andCheckRecord::start_fix(throughCycleLicence) take a judged decision; the source testevery_costly_decision_goes_through_the_judgereads the worker's sources.Decision points, before and after (before:
origin/mainat bae8df9; after: this branch)mod.rs:2840)mod.rs:2928); proceed plans again with the assumption as the answer; a second ask is a planner failuremod.rs:7093)mod.rs:2655); proceed codes the plan's files, or reports with nothing to codemod.rs:2544)mod.rs:2543); proceed codes on the assumptionmod.rs:4519)mod.rs:4710); proceed fails the run to retry, never generic questionsmod.rs:4582)mod.rs:4833); a repo not turned on is recorded as access only a person givesmod.rs:8527)mod.rs:8859); proceed opens CoderHelm's own draft beside itmod.rs:7686)mod.rs:8046)run_guard.rs:591,:631)run_guard.rs:626,:663); the wait names the blocker or the assumptionstop_pr.rs:68)stop_pr.rs:78)resume.rs:4896)resume.rs:4944)proof.rs:1767,link_checks.rs:1329,test_fix.rs:2045,feature/mod.rs:1144)proof.rs:1739,link_checks.rs:1326,test_fix.rs:2031,feature/mod.rs:1073)resume.rs:2620)resume.rs:2622)policy.rs:433)policy.rs:438)review_pr.rs:3064,review_verdict.rs:122)review_pr.rs:3077);postrefuses without a judged hold (review_verdict.rs:125)Not wired yet: CI auto-fix pushes (
claim_auto_fix_slot), planned-work rounds (finish_planned::next), and the outside-the-code report (endsneeds_outside_change, notneeds_input).Reviewer policy (
review_severity.rs:289classify,:194label,:261blocking_kind;review_agent.rs:832decide_verdict)review_agent.rs:603); it is now always posted as a Suggestion (CoderHelm still writes tests for its own changes). A test failing or proving nothing is still a correctness block. No stored settings change.description_review.rs).Replay suite (
worker/src/passes/replay/, CI step "Replay suite")cases/, run through the real decision functions and graded on the decision; pass^k with k = 3 recorded model answer lists where the judge is called.REPLAY_LIVE=1runs the real model;REPLAY_RECORD=1records fresh answers. README says how to add one.Outcome feedback (
common/src/decision_log.rs,gateway/src/routes/decisions.rs)DECISION#RUN#…,DECISION#PR#…) with its picture and the model's answers. Outcomes land from answers (default or otherwise), Cancel and Close, Retry, a dismissed CoderHelm review, and a merge (flagged file unchanged or fixed).GET /api/analytics/decisions(Unnecessary stops and Nuisance blocks: rate, count, categories, examples) andGET /api/analytics/decisions/export(confirmed-wrong decisions as replay cases). The weekly email gets a "Stops and blocks" line for members.Model and effort (
provider.rs:155judgment_model_id;JUDGMENT_EFFORT = "high")judgment_steps_run_on_the_strongest_model_at_high_effort). Extraction, formatting and edits stay as they were.model_prices.json: Opus 5.5 $4/$20 per M in/out, Sonnet 5.5 $2/$10, cache reads $0.20 on both; token counts from code comments and sizes, not measured):Overall: roughly +$1 to $3 per run and +$0.2 to $0.5 per review, against about $4 per 15-minute run step today. The replay suite gates any future downgrade.
Verification
cargo fmt --all --checkandcargo clippy --workspace --all-targets -- -D warningsclean.cargo testfor common, gateway and worker: 1495, 745 and 1330 pass. New: the judge (validation, re-ask, fallback, rule settlement), the decision log (round trip, outcomes, summary, merge outcome, export), the source tests (costly paths, judgment model and effort), the replay suite (9 cases, pass^k), the weekly line, the sweep's deadline (Python, 361 pass).